package com.mgkj.base.context;


import com.mgkj.entity.Dscma;

public class BaseContext {

    // 将ThreadLocal的泛型类型改为User
    public static ThreadLocal<Dscma> threadLocal = new ThreadLocal<>();

    // 设置当前的User对象
    public static void setCurrentUser(Dscma user) {
        threadLocal.set(user);
    }

    // 获取当前的User对象
    public static Dscma getCurrentUser() {
        return threadLocal.get();
    }

    // 移除当前的User对象
    public static void removeCurrentUser() {
        threadLocal.remove();
    }
}
